
cmake_minimum_required(VERSION 3.5.1)

project(font-drop-preview LANGUAGES CXX VERSION 0.2)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(Qt5 COMPONENTS Core Widgets Network Gui)

# 头文件目录
include_directories()

# 资源文件路径
set(QRC_SOURCES "sources.qrc")

add_executable(${PROJECT_NAME} 
    src/main.cpp
    src/mainwindow.cpp
    src/mainwindow.h
    
    src/view/fontpreviewwindow.cpp
    src/view/fontpreviewwindow.h
    src/view/fontlistdelegate.cpp
    src/view/fontlistdelegate.h
    src/view/fontlistmodel.cpp
    src/view/fontlistmodel.h
    src/view/fontlistview.cpp
    src/view/fontlistview.h

    ${QRC_SOURCES}
)
target_include_directories(${PROJECT_NAME} PRIVATE src/view)
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Widgets Qt5::Network Qt5::Gui)

include(cmake/linux-install/linux-install.cmake)
